using Microsoft.Practices.Unity;
using TFS.Kanban.Commons.Container;
using TFS.Kanban.Domain.Services;
using TFS.Kanban.VS2010.Services;

namespace TFS.Kanban.VS2010.Installers
{
    public class TFSDomainServiceInstaller : IUnityContainerInstaller
    {
        public IUnityContainer Install(IUnityContainer container)
        {
            return container.RegisterType<IProjectService, ProjectService>(new ContainerControlledLifetimeManager())
                            .RegisterType<IIterationService, IterationService>(new ContainerControlledLifetimeManager())
                            .RegisterType<IUserStoryService, UserStoryService>(new ContainerControlledLifetimeManager())
                            .RegisterType<IProjectCollectionService, ProjectCollectionService>(new ContainerControlledLifetimeManager())
                            .RegisterType<IWorkItemService, WorkItemService>(new ContainerControlledLifetimeManager());
        }
    }
}